import { http } from '@/utils/http'
import { ProfileResult, PutMemberProfileData } from '@/types/profile'

/**
 * 获取个人信息
 * @param Authorization token
 * @requires true
 * @returns 无
 */
export const getMemberProfile = () =>
  http<ProfileResult>({ url: '/member/profile' })

/**
 * 修改个人信息
 * @param Authorization token
 * @returns 无
 */
export const putMemberProfile = (data: PutMemberProfileData) =>
  http({ url: '/member/profile', method: 'PUT', data })